package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DwPhoneConnectMapper;
import com.ruoyi.system.domain.DwPhoneConnect;
import com.ruoyi.system.service.IDwPhoneConnectService;

/**
 * 呼叫管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-05
 */
@Service
public class DwPhoneConnectServiceImpl implements IDwPhoneConnectService 
{
    @Autowired
    private DwPhoneConnectMapper dwPhoneConnectMapper;

    /**
     * 查询呼叫管理
     * 
     * @param connectId 呼叫管理主键
     * @return 呼叫管理
     */
    @Override
    public DwPhoneConnect selectDwPhoneConnectByConnectId(Long connectId)
    {
        return dwPhoneConnectMapper.selectDwPhoneConnectByConnectId(connectId);
    }

    /**
     * 查询呼叫管理列表
     * 
     * @param dwPhoneConnect 呼叫管理
     * @return 呼叫管理
     */
    @Override
    public List<DwPhoneConnect> selectDwPhoneConnectList(DwPhoneConnect dwPhoneConnect)
    {
        return dwPhoneConnectMapper.selectDwPhoneConnectList(dwPhoneConnect);
    }

    /**
     * 新增呼叫管理
     * 
     * @param dwPhoneConnect 呼叫管理
     * @return 结果
     */
    @Override
    public int insertDwPhoneConnect(DwPhoneConnect dwPhoneConnect)
    {
        dwPhoneConnect.setCreateTime(DateUtils.getNowDate());
        return dwPhoneConnectMapper.insertDwPhoneConnect(dwPhoneConnect);
    }

    /**
     * 修改呼叫管理
     * 
     * @param dwPhoneConnect 呼叫管理
     * @return 结果
     */
    @Override
    public int updateDwPhoneConnect(DwPhoneConnect dwPhoneConnect)
    {
        return dwPhoneConnectMapper.updateDwPhoneConnect(dwPhoneConnect);
    }

    /**
     * 批量删除呼叫管理
     * 
     * @param connectIds 需要删除的呼叫管理主键
     * @return 结果
     */
    @Override
    public int deleteDwPhoneConnectByConnectIds(Long[] connectIds)
    {
        return dwPhoneConnectMapper.deleteDwPhoneConnectByConnectIds(connectIds);
    }

    /**
     * 删除呼叫管理信息
     * 
     * @param connectId 呼叫管理主键
     * @return 结果
     */
    @Override
    public int deleteDwPhoneConnectByConnectId(Long connectId)
    {
        return dwPhoneConnectMapper.deleteDwPhoneConnectByConnectId(connectId);
    }
}
